﻿using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Geodatabase;
using Inovout.Gis;

namespace Inovout.ArcGis
{
    public abstract class LayerInfo : Gis.ILayerInfo
    {
        #region Constructor

        protected ILayer arcLayer;
        internal ILayer ArcLayer
        {
            get { return arcLayer; }
        }
        protected LayerInfo(ILayer arcLayer)
        {
            this.arcLayer = arcLayer;
        }

        #endregion
    
        #region Name
        public string Name { get { return GetName(); } }

        protected virtual string GetName()
        {
            return arcLayer.Name;
        }
        #endregion

        #region Owner
        private IGroupLayerInfo owner;
        public IGroupLayerInfo Owner
        {
            get { return owner; }
            internal set { owner = value; }
        }
        #endregion
    }
}
